#include <iostream>
#include <vector>
#include <string>
using namespace std;

class Originator;
class Memento{
	private:
		string State;
		Memento(string);
	friend Originator;
};

Memento::Memento(string state){
	State=state;
}

class Originator{
	private:
		string state;
	public:
		void SetState(string);
		void CreateMemento();
		Memento * RestoreState(Memento *);
		void Show();
};

void Originator::SetState(string st){
	
}

void Originator::CreateMemento(){
	return new Memento(this->state);
}

Memento * Originator::RestoreState(Memento *men){
	state=men->State;
}

void Show(){
	
}

class Caretaker{
	private:
		vector <Memento *> v;
	public:
		void SetMemento(string);
		Memento * GetMemento (int);
};

void Caretaker::SetMemento(Memento *m){
	v.push_back(m);
}

Memento * Caretaker::GetMemento(int index){
	vector <Memento *>::iterator it;
	it=v.begin();
	it=v[index];
	return (*it);
}

int main(void){
	delete;
	return 0;
}
